from flask import session
from flask.ext.script import Manager
from flask_migrate import Migrate, MigrateCommand
from info import app,db

manager = Manager(app)
# 将当前的flask应用和数据库进行关联
Migrate(app, db)
# 添加迁移命令
manager.add_command('db', MigrateCommand)


@app.route("/")
def index():
    session['name'] = "老王"
    return "index"

if __name__ == "__main__":
    manager.run()
